package com.zjw.spring;

import org.springframework.beans.factory.FactoryBean;

import com.zjw.spring.model.Person;

/**
 * test FactoryBean
 * @author zjw
 *
 */
public class MyFactoryBean implements FactoryBean<Person> {

	@Override
	public Person getObject() throws Exception {
		return new Person(100,"facoryBeanPerson",18,null);
	}

	@Override
	public Class<?> getObjectType() {
		return Person.class;
	}

	@Override
	public boolean isSingleton() {
//		return false;
		return true;
	}

}
